package com.tcm.controller.backend;

import com.tcm.entity.resp.R;
import com.tcm.service.StatisticsService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Guqier
 * @version 1.0
 * @date 2023/10/9 19:51
 */
@RestController
@RequestMapping("/pc/statistic")
@RequiredArgsConstructor
public class StatisticController {

    private final StatisticsService statisticsService;

    /**
     * 获取首页统计信息
     * @return 统计信息
     */
    @RequestMapping(value = "/index", method = RequestMethod.GET)
    public R getIndexStatistic(){
        return R.success(statisticsService.getIndexStatistic());
    }

}
